﻿#pragma once

#include <QWidget>
#include "ui_VideoRenderViewWindow.h"
#include <QCloseEvent>
#include <QDebug>
#include "VideoRenderViewController.h"

class VideoRenderViewWindow : public QWidget
{
	Q_OBJECT

public:
	VideoRenderViewWindow(QWidget *parent = nullptr);
	~VideoRenderViewWindow();
public slots:
	void openFileAndStart();
	void onSelectPixFormatIndex(int pos);

protected:
	// 重写关闭事件处理函数
	void closeEvent(QCloseEvent* event) override;
	void resizeEvent(QResizeEvent* event) override;

private:
	Ui::VideoRenderViewWindow ui;
	int mWidth = 400;
	int mHeight = 300;
	IVideoRenderView::PixFormat m_fmt = IVideoRenderView::RGBA;
	bool isResizeFlag = false;
};
